import service from '@/api/http';

const loginApi = {
  // 登录: 用户名 & 密码
  /*
    "area": "+44",
    "userName": "155555555",
    "password": "aa12345611111",
    "channelId": "100000000",
    "loginType": 1
  */
  login: (params: object) => service.post(`/hall/user/login`, params),
  // 登录: 用户名 & code
  loginByEmail: (params: object) => service.post(`/hall/user/loginByEmail`, params),
  // 登录: 用户名 & code
  loginByPhone: (params: object) => service.post(`/hall/user/loginByPhone`, params),
  // 注册: 用户名 & code
  registerUser: (params: object) => service.post(`/hall/user/registerUser`, params),
  // 手机验证码 phone ： area + phone
  getPhoneVerifiy: (params: object) => service.post(`/hall/ynSms/send`, params),
  // 手机验证码  验证
  sendAuth: (params: object) => service.post(`/hall/ynSms/sendAuth`, params),
  // 邮箱验证码
  getEmailVerifiy: (params: object) => service.post(`/hall/sample/eamilSend`, params),
  // 邮箱验证码 {code: '1244', email: '15555'} 验证
  emailSendAuth: (params: object) => service.post(`/hall/sample/emailSendAuth`, params),
  // 更改邮箱或者手机接口
  findUserPhoneAndEmail: (params: object) => service.post(`/hall/playUserPersonal/findUserPhoneAndEmail`, params),

};
export default loginApi;
